<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <title>发布新闻</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">

	<link rel="stylesheet" type="text/css" href="<%=basePath%>admin/css/global.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>admin/css/form.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>admin/css/page.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>admin/css/css3.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>admin/css/style.css" />
	<style type="text/css">
		div.wapper h2.pagerTitle {
			border-bottom:2px solid #C1D9FF;
		}
	</style>
  </head>
  
  <body>
   	<div class="wapper show tableContainer">
		<h2 class="pagerTitle tabTitle"><a class="tab tabActive">发布信息</a></h2>
		<form id="newsform" name="newsform" enctype="multipart/form-data" method="post" action="addNews.action">
		<div class="inputLabelParent">
			<div class="inputLabel">
			<label class="left">文章标题:</label><input type="text" name="news.title" id="title" class="text" style="width:300px;" maxlength="50"><span class="tips" id="titleerror">* 必填，50字以内</span>
			</div>
			<div class="inputLabel heightauto">
			<label class="left">文章摘要:</label><textarea class="text" name="news.abstracts" id="abstracts" style="width: 300px"></textarea>
			</div>
			<div class="inputLabel">
			<label class="left">文章分类:</label>
				<select id="newsCategory" name="ncId"></select>
			</div>
			<div class="inputLabel" style="display:none;">
			<label class="left">首页图片:</label><s:file id="pic" name="pic" />
			</div>
			<div class="inputLabel">
			<label class="left">是否推荐:</label>
			<input type="radio" name="news.isRecommended" value="0" checked="checked" /> <label style="width:20px;">否</label>
			<input type="radio" name="news.isRecommended" value="1" /> <label style="width:20px;">是</label>
			</div>
			<div class="inputLabel">
			<label class="left">浏览数:</label><input type="text" name="news.readTimes" id="readTimes" class="text" style="width:100px;"  maxlength="10" onKeyUp="value=value.replace(/[^\d]/g,'')" maxlength="10"    onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
			</div>
			<div class="inputLabel heightauto">
			<label class="left">文章内容: </label><textarea name="news.content" ></textarea>
			</div>
			<div style="clear:both; padding-left:500px;">
			<div class="submit submitFloat"><input type="button" id="saveNews" value="保存" /> 
			</div>
			</div>
		</div>
		</form>
		<input type="hidden" id="errorinfo" value="${errorinfo}" />
   	</div>
   
   
   		<script type="text/javascript" src="<%=basePath%>/admin/js/jquery.js"></script>
		<script type="text/javascript" src="<%=basePath%>/admin/js/jqueryui.js"></script>
		<script type="text/javascript" src="<%=basePath%>/admin/js/simpleDialog.js"></script>
		<script type="text/javascript" src="<%=basePath%>/admin/news/js/checkForm.js"></script>
		<script type="text/javascript" src="<%=basePath%>/admin/fckeditor/fckeditor.js"> </script> 
   		<script language="JavaScript" type="text/javascript" charset="utf-8"> 
    		window.onload = function() { 
    		var oFCKeditor = new FCKeditor( 'news.content' ) ; 
    		oFCKeditor.BasePath = '<%=basePath%>/admin/fckeditor/';        
    		oFCKeditor.Height = 450 ;       
   			oFCKeditor.Width = 630 ;        
			oFCKeditor.ToolbarSet = 'Default';
			oFCKeditor.Config["CustomConfigurationsPath"]="<%=basePath%>/admin/fckeditor/myconfig.js";
			oFCKeditor.ReplaceTextarea();
    }
	</script> 
   
  </body>
</html>
